<?php
namespace app\index\controller;

use think\Controller;
use GatewayWorker\Lib\Gateway;
use think\Log;

class Index extends Controller
{
    public function index()
    {
        return $this->fetch();
    }

    public function send()
    {
        Gateway::$registerAddress = '127.0.0.1:1238';

        Gateway::sendToUid(1, json_encode(['message'=>'Hello world']));
        return $this->fetch();
    }
}
